<?php

namespace app\customer\controller;
use app\common\controller\PCBase;
use app\common\controller\DBase;
use app\common\library\Upload;
use app\customer\logic\OrderRefundLogic;
use app\product\logic\ProductLogic;
use  think\App;
class OrderRefund extends PCBase
{


    /**
     * @desc   获取发送消息配置列表接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function refundList(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->refundList($params);
    }


    /**
     * @desc   获取发送消息配置列表接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function refundListLog(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->refundListLog($params);
    }




    /**
     * @desc   获取发送消息导出接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function exportrefundList(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->exportrefundList($params);
    }


    /**
     * @desc   编辑接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function edit(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->edit($params);
    }


    /**
     * @desc   获取批次列表接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function getBatchList(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->getBatchList($params);
    }

    /**
     * @desc   获取批次详情列表接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function getBatchDetailList(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->getBatchDetailList($params);
    }


    /**
     * @desc   获取批次详情导出接口
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function exportBatchDetailList(){
        $params     = $this->request->post();
        return     (new OrderRefundLogic())->exportBatchDetailList($params);
    }


    /**
     * @desc   导入数据处理
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function importInfo(){
        $file   = $this->request->file('file');
        $tel    = $this->getAdminTel();
        $data['file'] = $file;
        $data['tel']  = $tel;
        (new OrderRefundLogic())->importInfo($data);
        return  $this->jsonMessage(200,true,'文件异步上传成功,等待一会可以查看结果!',null);
    }



    /**
     * @desc   批量创建退款订单
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function batchRefund(){
        $params     = $this->request->post();
        $params['adminId'] = $this->getAdminId();
        return     (new OrderRefundLogic())->batchRefund($params);
    }


    /**
     * @desc   批量创建退款consumer
     * @author luckyXiong
     * @date   2025-01-24
     */
    public function order_refund_consumer(){
        $params     = $this->request->post();
        $res        = (new OrderRefundLogic())->order_refund_consumer($params);
        return  $this->jsonMessage(200,true,'操作成功!',$res);
    }
    /**
     * @desc   移除待退款
     * @author zhangheng
     * @date   2025-03-17
     */
    public function del(){
        $params     = $this->request->post();
        $res        = (new OrderRefundLogic())->del($params);
        return  $this->jsonMessage(200,true,'操作成功!',$res);
    }





}